<?php
ini_set('display_errors', 0 );
error_reporting(0);
require_once('Connections/aciitu.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_aciitu, $aciitu);
$query_RsCategorias = "SELECT * FROM categoria ORDER BY nome ASC";
$RsCategorias = mysql_query($query_RsCategorias, $aciitu) or die(mysql_error());
$row_RsCategorias = mysql_fetch_assoc($RsCategorias);
$totalRows_RsCategorias = mysql_num_rows($RsCategorias);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body>

<table width="171" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="26" style="padding-left:8px;" valign="top" align="left"><img src="imagens/categoria.png" border="0" /></td>
                  </tr>
                </table>
                
                <table width="171" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><img src="imagens/cat_top.png" border="0" width="171" height="12" /></td>
                  </tr>
                  <tr>
                    <td style="padding-left:15px; background:#f6faff"><?php do { ?>
                        <a href="anuncio.php?cat=<?php echo $row_RsCategorias['id']; ?>" class="categ">
                            <?php echo $row_RsCategorias['nome']; ?><br />
                        </a>
                        <?php } while ($row_RsCategorias = mysql_fetch_assoc($RsCategorias)); ?></td>
                  </tr>
                  <tr>
                    <td><img src="imagens/cat_but.png" border="0" width="171" height="12" /></td>
                  </tr>
                </table>

</body>
</html>
<?php
mysql_free_result($RsCategorias);
?>
